package org.creativor.rayson.transport.client;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import org.creativor.rayson.transport.common.Packet;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The class <code>RpcConnectionTest</code> contains tests for the class
 * <code>{@link RpcConnection}</code>.
 * <p>
 * Copyright Creativor Studio (c) 2011
 * 
 * @generatedBy CodePro at 11-5-7 上午2:58
 * @author Nick Zhang
 * @version $Revision: 1.0 $
 */
public class RpcConnectionTest
{
	/**
	 * Launch the test.
	 * 
	 * @param args
	 *            the command line arguments
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	public static void main(String[] args)
	{
		new org.junit.runner.JUnitCore().run(RpcConnectionTest.class);
	}
	
	/**
	 * Perform pre-test initialization.
	 * 
	 * @throws Exception
	 *             if the initialization fails for some reason
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Before
	public void setUp() throws Exception
	{
		// TODO: add additional set up code here
	}
	
	/**
	 * Perform post-test clean-up.
	 * 
	 * @throws Exception
	 *             if the clean-up fails for some reason
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@After
	public void tearDown() throws Exception
	{
		// TODO: add additional tear down code here
	}
	
	/**
	 * Run the void addSendPacket(Packet) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testAddSendPacket_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		Packet packet = new Packet(new byte[] {});
		
		fixture.addSendPacket(packet);
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.addSendPacket(RpcConnection.java:56)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.addSendPacket(RpcConnection.java:189)
	}
	
	/**
	 * Run the void addSendPacket(Packet) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testAddSendPacket_2() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		Packet packet = new Packet(new byte[] {});
		
		fixture.addSendPacket(packet);
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.addSendPacket(RpcConnection.java:56)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.addSendPacket(RpcConnection.java:189)
	}
	
	/**
	 * Run the void addSendPacket(Packet) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testAddSendPacket_3() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		Packet packet = new Packet(new byte[] {});
		
		fixture.addSendPacket(packet);
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.addSendPacket(RpcConnection.java:56)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.addSendPacket(RpcConnection.java:189)
	}
	
	/**
	 * Run the void addSendPacket(Packet) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testAddSendPacket_4() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		Packet packet = new Packet(new byte[] {});
		
		fixture.addSendPacket(packet);
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.addSendPacket(RpcConnection.java:56)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.addSendPacket(RpcConnection.java:189)
	}
	
	/**
	 * Run the void addSendPacket(Packet) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testAddSendPacket_5() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		Packet packet = new Packet(new byte[] {});
		
		fixture.addSendPacket(packet);
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.addSendPacket(RpcConnection.java:56)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.addSendPacket(RpcConnection.java:189)
	}
	
	/**
	 * Run the void close() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testClose_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.close();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.close(RpcConnection.java:202)
	}
	
	/**
	 * Run the void close() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testClose_2() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.close();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.close(RpcConnection.java:202)
	}
	
	/**
	 * Run the void close() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testClose_3() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.close();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.close(RpcConnection.java:202)
	}
	
	/**
	 * Run the long getId() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testGetId_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		long result = fixture.getId();
		
		// TODO: add additional test code here
		assertEquals(11L, result);
	}
	
	/**
	 * Run the SocketAddress getServerSocket() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testGetServerSocket_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		SocketAddress result = fixture.getServerSocket();
		
		// TODO: add additional test code here
		assertNotNull(result);
	}
	
	/**
	 * Run the long getTimeoutInterval() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testGetTimeoutInterval_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		long result = fixture.getTimeoutInterval();
		
		// TODO: add additional test code here
		assertEquals(60000L, result);
	}
	
	/**
	 * Run the byte getVersion() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testGetVersion_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		byte result = fixture.getVersion();
		
		// TODO: add additional test code here
		assertEquals((byte) 1, result);
	}
	
	/**
	 * Run the void init() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test(expected = java.net.ConnectException.class)
	public void testInit_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.init();
		
		// TODO: add additional test code here
	}
	
	/**
	 * Run the void init() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test(expected = java.net.ConnectException.class)
	public void testInit_2() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.init();
		
		// TODO: add additional test code here
	}
	
	/**
	 * Run the void init() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test(expected = java.net.ConnectException.class)
	public void testInit_3() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.init();
		
		// TODO: add additional test code here
	}
	
	/**
	 * Run the void init() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test(expected = java.net.ConnectException.class)
	public void testInit_4() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.init();
		
		// TODO: add additional test code here
	}
	
	/**
	 * Run the void init() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test(expected = java.net.ConnectException.class)
	public void testInit_5() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.init();
		
		// TODO: add additional test code here
	}
	
	/**
	 * Run the void init() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test(expected = java.net.ConnectException.class)
	public void testInit_6() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.init();
		
		// TODO: add additional test code here
	}
	
	/**
	 * Run the void init() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test(expected = java.net.ConnectException.class)
	public void testInit_7() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.init();
		
		// TODO: add additional test code here
	}
	
	/**
	 * Run the void init() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test(expected = java.net.ConnectException.class)
	public void testInit_8() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.init();
		
		// TODO: add additional test code here
	}
	
	/**
	 * Run the int pendingPacketCount() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testPendingPacketCount_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		int result = fixture.pendingPacketCount();
		
		// TODO: add additional test code here
		assertEquals(0, result);
	}
	
	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testRead_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		int result = fixture.read();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.read(RpcConnection.java:274)
		assertEquals(0, result);
	}
	
	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testRead_2() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		int result = fixture.read();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.read(RpcConnection.java:274)
		assertEquals(0, result);
	}
	
	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testRead_3() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		int result = fixture.read();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.read(RpcConnection.java:274)
		assertEquals(0, result);
	}
	
	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testRead_4() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		int result = fixture.read();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.read(RpcConnection.java:274)
		assertEquals(0, result);
	}
	
	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testRead_5() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		int result = fixture.read();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.read(RpcConnection.java:274)
		assertEquals(0, result);
	}
	
	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testRead_6() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		int result = fixture.read();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.read(RpcConnection.java:274)
		assertEquals(0, result);
	}
	
	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testRead_7() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		int result = fixture.read();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.read(RpcConnection.java:274)
		assertEquals(0, result);
	}
	
	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testRead_8() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		int result = fixture.read();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.read(RpcConnection.java:274)
		assertEquals(0, result);
	}
	
	/**
	 * Run the RpcConnection(SocketAddress,PacketManager,Listener) constructor
	 * test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testRpcConnection_1() throws Exception
	{
		SocketAddress serverSocket = new InetSocketAddress(1);
		PacketManager packetManager = new PacketManager();
		Listener listener = new Listener(new ConnectionManager());
		
		RpcConnection result = new RpcConnection(serverSocket, packetManager, listener);
		
		// TODO: add additional test code here
		assertNotNull(result);
		assertEquals(0L, result.getId());
		// assertEquals(false, result.isClosed());
		assertEquals((byte) 1, result.getVersion());
		assertEquals(0, result.pendingPacketCount());
		assertEquals(1304708291476L, result.getCreationTime());
		assertEquals(1304708291476L, result.getLastContactTime());
		assertEquals(false, result.isTimeOut());
	}
	
	/**
	 * Run the String toString() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testToString_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		String result = fixture.toString();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.lang.NullPointerException
		// at
		// org.creativor.rayson.transport.client.RpcConnection.toString(RpcConnection.java:315)
		assertNotNull(result);
	}
	
	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testWrite_1() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.write();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.util.NoSuchElementException
		// at java.util.LinkedList.remove(LinkedList.java:788)
		// at java.util.LinkedList.removeFirst(LinkedList.java:134)
		// at java.util.LinkedList.remove(LinkedList.java:481)
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.write(RpcConnection.java:69)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.write(RpcConnection.java:326)
	}
	
	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testWrite_2() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.write();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.util.NoSuchElementException
		// at java.util.LinkedList.remove(LinkedList.java:788)
		// at java.util.LinkedList.removeFirst(LinkedList.java:134)
		// at java.util.LinkedList.remove(LinkedList.java:481)
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.write(RpcConnection.java:69)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.write(RpcConnection.java:326)
	}
	
	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testWrite_3() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.write();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.util.NoSuchElementException
		// at java.util.LinkedList.remove(LinkedList.java:788)
		// at java.util.LinkedList.removeFirst(LinkedList.java:134)
		// at java.util.LinkedList.remove(LinkedList.java:481)
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.write(RpcConnection.java:69)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.write(RpcConnection.java:326)
	}
	
	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testWrite_4() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.write();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.util.NoSuchElementException
		// at java.util.LinkedList.remove(LinkedList.java:788)
		// at java.util.LinkedList.removeFirst(LinkedList.java:134)
		// at java.util.LinkedList.remove(LinkedList.java:481)
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.write(RpcConnection.java:69)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.write(RpcConnection.java:326)
	}
	
	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 上午2:58
	 */
	@Test
	public void testWrite_5() throws Exception
	{
		RpcConnection fixture =
				new RpcConnection(new InetSocketAddress(1), new PacketManager(), new Listener(
						new ConnectionManager()));
		
		fixture.write();
		
		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.util.NoSuchElementException
		// at java.util.LinkedList.remove(LinkedList.java:788)
		// at java.util.LinkedList.removeFirst(LinkedList.java:134)
		// at java.util.LinkedList.remove(LinkedList.java:481)
		// at
		// org.creativor.rayson.transport.client.RpcConnection$PacketWriter.write(RpcConnection.java:69)
		// at
		// org.creativor.rayson.transport.client.RpcConnection.write(RpcConnection.java:326)
	}
}
